//
//  PersonViewController.m
//  BuffetNews
//
//  Created by 李荃荃 on 14-11-11.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "PersonViewController.h"
#import "WebColor.h"
#import "NightModel.h"
@interface PersonViewController ()

@end

@implementation PersonViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //  返回按钮
    UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
    button.frame = CGRectMake(10, self.view.frame.size.height - 30, 40, 30);
    [button setBackgroundImage:[UIImage imageNamed:@"btn_home.png"] forState:UIControlStateNormal];
    [button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:button];

    // 放图标的imageView
    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(self.view.frame.size.width / 2 - 30, 80, 60, 60)];
    imageView.backgroundColor = [UIColor grayColor];
    imageView.image = [UIImage imageNamed:@"58-58.png"];
    [self.view addSubview:imageView];
    
    //  软件名称
    UILabel *nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(self.view.frame.size.width / 2 - 50, 160, 100, 30)];
    nameLabel.textAlignment = NSTextAlignmentCenter;
    nameLabel.text = @"Buffet News";
    nameLabel.font = [UIFont boldSystemFontOfSize:17];

    [self.view addSubview:nameLabel];
    
    UILabel *introduceLabel = [[UILabel alloc] initWithFrame:CGRectMake(20, 200, 280, 100)];

    
    introduceLabel.text = @"   Buffet News是一款集咨询、报纸、杂志、图片为一体的综合性新闻浏览咨询平台。包括微博转发等分享功能，实现个性化设计，可以满足不同人群的新闻需求。";
    introduceLabel.font = [UIFont systemFontOfSize:16];
    introduceLabel.numberOfLines = 0;
    introduceLabel.textColor = [WebColor dimGray];
    [self.view addSubview:introduceLabel];
    
    UIImageView *bossView = [[UIImageView alloc]initWithFrame:CGRectMake(20 ,self.view.frame.size.height / 2 + 30,64 , 64)];
    UIImage *bossImage = [UIImage imageNamed:@"大哥.jpg"];
    //label
    UILabel *bossName = [[UILabel alloc]initWithFrame:CGRectMake(20 ,self.view.frame.size.height / 2 + 54,65 , 116)];
    bossName.text = @"大卫";
    bossName.font = [UIFont systemFontOfSize:14];
    bossName.textAlignment = NSTextAlignmentCenter;

    UILabel *bossLabel = [[UILabel alloc]initWithFrame:CGRectMake(20 ,self.view.frame.size.height / 2 + 134,65 , 116)];
    bossLabel.text = @"  明明在一个地方却不能相遇  最远的距离莫过于此";
    bossLabel.font = [UIFont systemFontOfSize:13];
    bossLabel.textAlignment = NSTextAlignmentCenter;

    bossLabel.numberOfLines = 0;
    bossView.image = bossImage;
    [self.view addSubview:bossName];
    [self.view addSubview:bossLabel];
    [self.view addSubview:bossView];
    
    UIImageView *CJhView = [[UIImageView alloc]initWithFrame:CGRectMake((self.view.frame.size.width - 64) / 2 ,self.view.frame.size.height / 2 + 30,64 , 64)];
    UIImage *CJhimage = [UIImage imageNamed:@"组长.jpg"];
    UILabel *cjhLabel = [[UILabel alloc]initWithFrame:CGRectMake((self.view.frame.size.width - 64) / 2 ,self.view.frame.size.height / 2 + 134,65 , 116)];
    
    UILabel *bossName1 = [[UILabel alloc]initWithFrame:CGRectMake((self.view.frame.size.width - 64) / 2 ,self.view.frame.size.height / 2 + 54,65 , 116)];
    bossName1.text = @"阿荃(组长)";
    bossName1.font = [UIFont systemFontOfSize:14];
    bossName1.textAlignment = NSTextAlignmentCenter;
    
    cjhLabel.text = @"  我们要做的就是可以努力与你面对面";
    cjhLabel.font = [UIFont systemFontOfSize:13];
    cjhLabel.textAlignment = NSTextAlignmentCenter;
    cjhLabel.numberOfLines = 0;
    cjhLabel.textColor = [UIColor blackColor];
    CJhView.image = CJhimage;
    [self.view addSubview:bossName1];
    [self.view addSubview:cjhLabel];
    [self.view addSubview:CJhView];
    
    UIImageView *bigView = [[UIImageView alloc]initWithFrame:CGRectMake(self.view.frame.size.width - 84 ,self.view.frame.size.height / 2 + 30,65 , 64)];
    UIImage *bigImage = [UIImage imageNamed:@"me.jpg"];
    UILabel *bigLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.view.frame.size.width - 84  ,self.view.frame.size.height / 2 + 134,64 ,116)];
    UILabel *bossName2 = [[UILabel alloc]initWithFrame:CGRectMake(self.view.frame.size.width - 84 ,self.view.frame.size.height / 2 + 54,65 , 116)];
    bossName2.text = @"佳鸿";
    bossName2.font = [UIFont systemFontOfSize:14];
    bossName2.textAlignment = NSTextAlignmentCenter;
    
    bigLabel.text = @"这是一个关于我们的故事";
    bigView.image = bigImage;
    bigLabel.font = [UIFont systemFontOfSize:13];
    bigLabel.numberOfLines = 0;
    bigLabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:bossName2];
    [self.view addSubview:bigLabel];
    [self.view addSubview:bigView];
    
    
    [bossName release];
    [bossName1 release];
    [bossName2 release];
    [cjhLabel release];
    [bigLabel release];
    [bossLabel release];
    [bossView release];
    [bigView release];
    [CJhView release];
    
    if ([NightModel shareInstance].open == 1) {
        self.view.backgroundColor = [WebColor dimGray];
        introduceLabel.textColor = [UIColor blackColor];
    } else {
        self.view.backgroundColor = [WebColor mistyRose];
    }
    
    [introduceLabel release];
    [nameLabel release];
    [imageView release];
}
//  返回首页方法
- (void)buttonClicked:(UIButton *)button
{
    [self dismissViewControllerAnimated:YES completion:^{
    }];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
